<?php
$this->pageTitle = BUtils::T('meta_title_seo_restaurant') . ' - Yamii.fi';
?>
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Cabin" rel="stylesheet" type="text/css">
<style>
.cmp-box {background:#eee; padding:16px; border-radius:8px; box-shadow: 2px 2px 2px #aaa;}
.cmp-line {background:#fff; padding:16px; border-radius:8px; margin-bottom:16px;}
.cmp-merchant {float:left; width:120px;}
.cmp-users {overflow:hidden;}
.cmp-high-lights {font-weight:bold; color:#08c; font-family: 'Lobster', Georgia, Times, serif; font-size: 40px; line-height: 50px; margin-top:10px;}
.cmp-text {font-family: 'Cabin', Helvetica, Arial, sans-serif;; font-size: 18px; line-height: 30px;}
.cmp-list li{line-height: 30px;}
</style>
<div class="row-fluid">
	<div class="span12" style="text-align:center;">
		<img src="<?php echo Yii::app()->baseUrl; ?>/img/you_taste_we_pay.web.jpg" style="width:100%;" alg="You Taste, We Pay" />
	</div>
</div>
<div class="row-fluid">
	<div class="span12">
		<div class="cmp-text" style="padding:20px; background-color:#F6F7E5; color:#111;">
<?php
$link = Yii::app()->createUrl('app/campaign');
if (Yii::app()->language == 'fi_fi') {
	echo <<<HTML
	<div class="cmp-high-lights">Näin osallistut:</div>
	<ol class="cmp-list">
	<li>Lataa Yamii App, Kirjaudu sisään Facebook-tililläsi.</li>
	<li>Kun käytät tarjousta Yamii kautta kampanjan aikana, sinut lisätään ravintolakohtaiseen arvontalistaan, jonka perusteella voittaja valitaan.</li>
	<li>Kampanja päättyy 30.4. 2013 klo 10.00, silloin arvomme jokaisesta ravintolasta yhden voittajan. Korvaamme voittajan tarjouskustannukset.</li>
	</ol>
	<div>Julkaisemme voittajat 1.5.2013 osoitteessa http://www.yamii.fi sekä Facebook-sivullamme <a href="http://www.facebook.com/yamiideal">http://www.facebook.com/yamiideal</a></div>
	<div class="cmp-high-lights">Vinkki:</div>
	<div>Jos olet ainoa, joka lunastaa tarjouksen tietyssä ravintolassa, olet 100 % varmuudella voittaja.</div>
	<div>Ravintolalistan voit tarkistaa täältä.</div>
HTML;
} else {
	echo <<<HTML
	<div class="cmp-high-lights">How to participate:</div>
	<ol class="cmp-list">
	<li>Download Yamii App, and login with your Facebook account.</li>
	<li>When you use an offer with Yamii during the campaign time. You will be added to a list of that restaurant for later raffle.</li>
	<li>At 22.00 on 30 April, 2013, we will randomly select one lucky user from each restaurant list to be the winner and refund the offer expense to the winner.</li>
	</ol>
	<div>On 1st May we will publish the winners on http://www.yamii.fi and our Facebook page <a href="http://www.facebook.com/yamiideal">http://www.facebook.com/yamiideal</a>.</div>
	<div class="cmp-high-lights">Tips:</div>
	<div>If you are the only one who redeemed the offer in one restaurant then you have 100% probability to be the lucky one.</div>
	<div>Please check the restaurant list below,</div>
HTML;
}
?>
		</div>
	</div>
</div>
<div class="row-fluid bottom-space">
	<div class="cmp-box">
		<div class="cmp-high-lights">Congrats! You 3 are the Winers:</div>
		<div class="cmp-line">
		<table>
			<tr>
				<td style="width:120px;text-align:center;"><img style="width:32px;height:32px;" src="http://graph.facebook.com/harri.leinikka/picture" /><br />Harri Leinikka</td>
				<td>Redeemed an offer at <a href="<?php echo Yii::app()->createUrl('/restaurant/view', array('id'=>10176)) ?>">Flada 13</a>.</td>
			</tr>
			<tr>
				<td style="width:120px;text-align:center;"><img style="width:32px;height:32px;" src="http://graph.facebook.com/leilei1982/picture" /><br />Lei Lei</td>
				<td>Redeemed an offer at <a href="<?php echo Yii::app()->createUrl('/restaurant/view', array('id'=>10171)) ?>">Ravintola Asian 1</a>.</td>
			</tr>
			<tr>
				<td style="width:120px;text-align:center;"><img style="width:32px;height:32px;" src="http://graph.facebook.com/juhani.janhunen/picture" /><br />Juhani Janhunen</td>
				<td>Redeemed an offer at <a href="<?php echo Yii::app()->createUrl('/restaurant/view', array('id'=>10231)) ?>">Restaurant and bar Aviin</a></td>
			</tr>
		</table>
		</div>
	</div>
</div>
<div class="row-fluid">
		<div class="cmp-box">
<?php foreach ($rows as $m) { ?>
			<div class="cmp-line">
				<div class="cmp-merchant">
					<img src="<?php echo BUtils::GetBusinessPictureUrl($m['url_logo']); ?>" style="width:90px;" />
				</div>
				<div class="cmp-users">
					<div style="border-bottom:1px solid #bbb;">
						<b><a href="<?php echo Yii::app()->createUrl('restaurant/view', array('id'=>$m['id'])); ?>"><?php echo $m['name']; ?></a></b>
						- <?php echo $m['address']; ?>, <?php echo $m['city']; ?>
					</div>
<?php
foreach ($m['users'] as $u) {
	echo <<<HTML
	<img src="{$u['picture']}" style="width:32px;height:32px;" alg="" />
HTML;
}
?>
				</div>
				<div class="clearfix"></div>
			</div>
<?php } ?>
		</div>
	</div>
</div>
<script type="text/javascript">
</script>